package com.codingapi.websocket.core.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author modificial
 * @date 2018/7/19
 * @company codingApi
 * @description 配置
 */
@ConfigurationProperties(prefix = "codingapi.server.config")
@Component
public class ServerConfig {
    /**
     * 端口号
     **/
    private int port;
    /**
     * 线程数
     **/
    private int workerCount;
    private int backlog;
    private boolean tcpNodelay;
    private boolean keepalive;

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public int getWorkerCount() {
        return workerCount;
    }

    public void setWorkerCount(int workerCount) {
        this.workerCount = workerCount;
    }

    public int getBacklog() {
        return backlog;
    }

    public void setBacklog(int backlog) {
        this.backlog = backlog;
    }

    public boolean isTcpNodelay() {
        return tcpNodelay;
    }

    public void setTcpNodelay(boolean tcpNodelay) {
        this.tcpNodelay = tcpNodelay;
    }

    public boolean isKeepalive() {
        return keepalive;
    }

    public void setKeepalive(boolean keepalive) {
        this.keepalive = keepalive;
    }
}
